package cn.edu.scnu.movies.mapper;

import cn.edu.scnu.movies.entity.movies;
import cn.edu.scnu.show_and_find_movies.model.Movie;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MoviesMapper {

    /**
     * 获取好评排行榜
     */
    @Select("select * from movies order by rating desc")
    List<movies> getRatingRank();

    /**
     * 获取本周排行耪
     */
    @Select("select * from movies order by week_hits desc")
    List<movies> getWeekRank();

    /**
     * 获取本月排行耪
     */
    @Select("select * from movies order by month_hits desc")
    List<movies> getMonthRank();

    @Select("select * from movies order by total_hits desc")
    List<movies> getHotMovies();
}
